import QtQuick 1.0

Rectangle {
    width: 360
    height: 360

    Rectangle {
	id: myRect
	color: "lightblue"
	height: 50
	width: parent.width

	Text {
	    id: myText
	    anchors.centerIn: parent
	    color: "black"
	}
    }

    ListModel {
	id: appModel
	ListElement { name: "This is page 1"; pageColor: "blue" }
	ListElement { name: "This is page 2"; pageColor: "green" }
	ListElement { name: "This is page 3"; pageColor: "red" }
	ListElement { name: "This is page 4"; pageColor: "gray" }
	ListElement { name: "This is page 5"; pageColor: "black" }
	ListElement { name: "This is page 6"; pageColor: "purple" }
    }


    PageControl {
	width: parent.width
	anchors.top: myRect.bottom
	anchors.bottom: parent.bottom
	listModel: appModel

	onPageChanged: myText.text = "Page changed: " + page
    }

    Image {
	source: "close.png"
	anchors.right: parent.right
	anchors.top: parent.top
	anchors.margins: 5

	MouseArea {
	    anchors.fill: parent
	    onClicked: Qt.quit()
	}
    }
}
